<!DOCTYPE html>
<!-- saved from url=(0035)http://c.tsz90.com/home/mytask.html -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    
    <title>我发布的</title>
    <link rel="stylesheet" href="__PUBLIC__/static/css/renwu/bootstrap.css">
    <link rel="shortcut icon" href="http://c.tsz90.com/home/clientapp/images/new_images/favicon.ico">
<link href="__PUBLIC__/static/css/renwu/reset_5.css" rel="stylesheet" type="text/css">
<link href="__PUBLIC__/static/css/renwu/style.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="__PUBLIC__/static/css/renwu/font-awesome.min.css">
<link href="__PUBLIC__/static/css/renwu/new_style.css" rel="stylesheet" type="text/css">
<!-- 弹出层 -->
<link rel="stylesheet" href="__PUBLIC__/static/css/renwu/dialog.css">
<script src="__PUBLIC__/static/js/renwu/jquery-2.0.3.min.js"></script>
<script src="__PUBLIC__/static/js/renwu/dialog.js"></script>
<!-- 弹出层 -->
<script type="text/javascript" src="__PUBLIC__/static/js/renwu/clipboard.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/static/js/renwu/global.js"></script>


    <style type="text/css">
        .zhuanghu-tab li {
            width: 20%;
        }
        .task-list-remain-num span {
            width: 33.33%;
            float: left;
            text-align: center;
        }
        .paging {
            margin: 30px 0;
        }
        .dialog {
          position: fixed;
          left: 0;
          top: 0;
          z-index: 10001;
          width: 100%;
          height: 100%;
        }
        .dialog-content {
            width: 70%;
        }
        .dialog-overlay {
          position: absolute;
          top: 0;
          left: 0;
          z-index: 10002;
          width: 100%;
          height: 100%;
          background-color: rgba(0, 0, 0, 0.5);
        }
    </style>
</head>

<body>
<div class="site-header header-fixed">
    <a onclick="history.back()" class="back"><img src="__PUBLIC__/static/upload/renwu/icon_back.png" alt=""></a>
    <div class="tit-name">我发布的</div>
    <span class="dowm-btn publish-task-btn">
        <a href="reward" class="sc" style="color: #fff;">新增</a>
    </span>
</div>
<div class="main Myrelease">
    <div class="zhuanghu-tab">
        <ul class="zh-tab-tit">
            <li id="all" class="active" data-type='全部'>全部</li>
            <li id="wait" class="" data-type='待审核'>待审核</li>
            <li id="ing" class="" data-type='进行中'>进行中</li>
            <li id="stop" class="" data-type='已暂停'>已暂停</li>
            <li id="past" class="" data-type='已完成'>已完成</li>
        </ul>
    </div>
    <div class="task-list">
                <div class="new-task-list">
            <ul>
            <?php foreach ($res as $key => $value): ?>
                 <li>
                    <div class="task-list-wrap">
                        <div style="border-radius:5px;float:left;margin-top:0px;margin-right:10px;">
                    <img src="__PUBLIC__/static/upload/renwu/caf58157f68ca4705830e8e0a156bc20.png" style="width:40px;">
                    </div>
                    
                        <div class="task-list-title-silver" style="height:15px;" id="management" data-id='<?php echo $value['id'] ?>'>
                            <div class="task-list-title"><?php echo $value['pro_name'] ?></div>
                            <span class="task-list-gold" id="management" data-id='<?php echo $value['id'] ?>'>
                               <img src="__PUBLIC__/static/upload/renwu/youjiantou.png" width="20" height="" border="0" alt="">
                            </span>
                        </div>
                        
                        
                        <span class="task-list-remain-num" onclick="window.location.href=&#39;/home/mytask/mytaskadmin/id/591&#39;">数量<?php echo $value['ticket_num'] ?>，剩余<?php echo $value['ticket_num'] ?>份</span>
                        
                        
                        <div class="task-list-manage">
                            <a href="javascript:" class="task-list-manage-button task-list-manage-del" id="stopMyTask591" data-id="<?php echo $value['id'] ?>"><?php if ($value['suspended']==1){ ?>
                                开始任务
                            <?php }else{ ?>
                            暂停任务
                        <?php } ?></a>
                             
                             <a href="http://c.tsz90.com/home/mytaskaudit/index/id/591.html" data-id="<?php echo $value['id'] ?>" class="task-list-manage-button"><?php if ($value['audit']==1){ ?>
                                审核通过
                            <?php }else{ ?>
                            审核
                        <?php } ?></a>
                            
                           
                            <a href="javascript:" id="outStockTask591" data-id="<?php echo $value['id'] ?>" class="task-list-manage-button task-list-manage-del"><?php if ($value['status']==1){ ?>
                                取消发布
                            <?php }else{ ?>
                            发布
                        <?php } ?></a>

                        </div>
                    </div>
                </li>
                <?php endforeach ?>
            </ul>
        </div
        <div class="task-del" style="display:none;">
            <a href="http://c.tsz90.com/home/mytask.html#" class="button4" onclick="MySaveTask.delSave()">删除(0)</a>
        </div>
        <div class="paging clearfix" style="display: block;">
            <span class="paging-prev">上一页</span>
            <span class="paging-num-total">
                    <select name="page" class="paging-selct">
                                                <option value="1">1</option>
                                            </select>
                </span>
            <span class="paging-next" data-page="1">下一页</span>
            <form id="page_form">
                <input type="hidden" name="page" value="1">
            </form>
        </div>
            </div>
</div>

<footer>
    <div class="container">
         <ul>
            <li>
                <a href="http://c.tsz90.com/home/index.html">
                    <img src="__PUBLIC__/static/upload/renwu/footer01_off.png" alt="">
                    <p>首页</p>
                </a>
            </li>
            <li>
                <a href="http://c.tsz90.com/home/task/task_all">
                    <img src="__PUBLIC__/static/upload/renwu/footer02_off.png" alt="">
                    <p>任务大厅</p>
                </a>
            </li>
            <li>
                <a href="http://fanli.houtianbest.cn/index.php/m">
                    <img src="__PUBLIC__/static/upload/renwu/footer03_off.png" alt="">
                    <p>商城</p>
                </a>
            </li>
            <li>
                <a href="http://c.tsz90.com/home/account.html">
                    <img src="__PUBLIC__/static/upload/renwu/footer04_off.png" alt="">
                    <p>我的</p>
                </a>
            </li>
         </ul>
    </div>
</footer>

<link rel="stylesheet" href="__PUBLIC__/static/css/renwu/style(1).css">
<script type="text/javascript" src="__PUBLIC__/static/js/renwu/bootstrap.js"></script>
<script type="text/javascript" src="__PUBLIC__/static/js/renwu/bootbox.min.js"></script>
<script type="text/javascript">
var $setting_top_fee = '2';
var $setting_top_max_hour = '300';
</script>
<script type="text/javascript" src="__PUBLIC__/static/js/renwu/mytask.js"></script>
<script src="__PUBLIC__/static/js/renwu/clipboard.min(1).js"></script>
<script>
 
        var clipboard = new ClipboardJS('.btn');
        clipboard.on('success', function(e) {
            console.info('Action:', e.action);
            console.info('Text:', e.text);
            console.info('Trigger:', e.trigger);
            message('复制网址成功,请到浏览器下载数据','','success')
            e.clearSelection();
        });
 
       clipboard.on('error', function(e) {
            console.error('Action:', e.action);
            console.error('Trigger:', e.trigger);
            message('复制失败','','error')
        });
        
    </script>
<script>
//发布
    $(document).on('click','#outStockTask591',function(){
        var id=$(this).attr('data-id');
        // alert(id);
        $.ajax({
            url:'cancel',
            data:{
                id:id
            },
            success:function(e){
                var json=JSON.parse(e);
                if(json.code==0){
                    // var str='<a href="javascript:" id="outStockTask591" class="task-list-manage-button task-list-manage-del">发布</a>';
                    // .replaceWith(str);
                    alert(json.msg);
                    location.reload();
                }else{
                    // var str='<a href="javascript:" id="outStockTask591" class="task-list-manage-button task-list-manage-del">取消发布</a>';
                    // $(this).replaceWith(str);
                    alert(json.msg);
                    location.reload();
                }
            }
        })
    })
    //暂停任务
    $(document).on('click','#stopMyTask591',function(){
        var id=$(this).attr('data-id');
        // alert(id);
        $.ajax({
            url:'suspended',
            data:{
                id:id
            },
            success:function(e){
                var json=JSON.parse(e);
                if(json.code==0){
                    // var str='<a href="javascript:" id="outStockTask591" class="task-list-manage-button task-list-manage-del">发布</a>';
                    // .replaceWith(str);
                    alert(json.msg);
                    location.reload();
                }else{
                    // var str='<a href="javascript:" id="outStockTask591" class="task-list-manage-button task-list-manage-del">取消发布</a>';
                    // $(this).replaceWith(str);
                    alert(json.msg);
                    location.reload();
                }
            }
        })
    })
    $(document).on('click','#management',function(){
        var id=$(this).attr('data-id');
        $.ajax({
            url:'management',
            data:{
                id:id
            },
            success:function(e){
                var json=JSON.parse(e);
                var id=json.id;
                location.href="http://www.tp.com/thinkphp5/public/index.php/index/renwu/management1?id="+id;
            }
        })
    })
    $(document).on('click','.zh-tab-tit li',function(){
        var val=$(this).attr('data-type');
        // alert(val);
        $.ajax({
            url:'classification',
            data:{
                val:val
            },
            success:function(e){
                var json=JSON.parse(e);
                var str='';
                var res=json.res;
                $(res).each(function(k,v){
                    str+='<div class="task-list-wrap">';
                    str+='<div style="border-radius:5px;float:left;margin-top:0px;margin-right:10px;">';
                    str+='<img src="__PUBLIC__/static/upload/renwu/caf58157f68ca4705830e8e0a156bc20.png" style="width:40px;">';
                    str+='</div>';
                    str+='<div class="task-list-title-silver" style="height:15px;" id="management" data-id="'+v.id+'">';
                    str+=' <div class="task-list-title"><?php echo $value['pro_name'] ?></div>';
                    str+='<span class="task-list-gold" id="management" data-id="'+v.id+'">';
                    str+='<img src="__PUBLIC__/static/upload/renwu/youjiantou.png" width="20" height="" border="0" alt="">';
                    str+='</span>';
                    str+='</div>';
                        
                        
                    str+='<span class="task-list-remain-num" onclick="window.location.href=&#39;/home/mytask/mytaskadmin/id/591&#39;">数量'+v.ticket_num+'，剩余'+v.ticket_num+'份</span>';
                        
                        
                    str+='<div class="task-list-manage">';
                    str+='<a href="javascript:" class="task-list-manage-button task-list-manage-del" id="stopMyTask591" data-id="'+v.id+'">暂停任务</a>';
                             
                    str+='<a href="http://c.tsz90.com/home/mytaskaudit/index/id/591.html" data-id="'+v.id+'" class="task-list-manage-button">审核(0)</a>';
                            
                           
                    str+='<a href="javascript:" id="outStockTask591" data-id="'+v.id+'" class="task-list-manage-button task-list-manage-del">';
                    // str+='<?php if ('+v.status+'==1){ ?>
                    //             取消发布
                    //         <?php }else{ ?>
                    //         发布
                    //     <?php } ?>';
                        str+='</a>';

                    str+=' </div>';
                    str+='</div>';
                    });
                $('.new-task-list ul li').replaceWith(str);
            }
        })
    })
</script>


</body></html>